#!/usr/bin/env python
# encoding: utf-8
"""
@author: youfeng
@email: youfeng243@163.com
@license: Apache Licence
@file: proxy_conf.py
@time: 2017/12/20 10:35
"""

# 动态代理服务远程访问地址
DYNAMIC_PROXY_CONF = {
    # 远程
    'host': '192.168.0.90',
    # 本地
    # 'host': '192.168.0.90',
    'port': 9300,
}

# 静态代理服务远程访问地址
STATIC_PROXY_URL = 'http://192.168.0.90:9500/proxy/list'

# 代理网关
GATEWAY_PROXY_URL = "http://192.168.0.90:9600/proxy?tag={}&host={}"


class GateWayType(object):
    # 所有代理
    GATEWAY_ALL = 'all'
    # 云代理
    GATEWAY_YUN = 'yun'
    # 快代理
    GATEWAY_KUAI = 'kuai'
    # 全网代理
    GATEWAY_QUANWANG = 'quanwang'
    # 亿洲代理
    GATEWAY_YIZHOU = 'yizhou'
    # 亿洲百万IP测试
    GATEWAY_YIZHOU_TEST = 'yinzhou_test'

# # 免费代理服务地址
# # 只能1网段访问
# HAIPPROXY_URL = '192.168.0.90:9400'
# HAIPPROXY_PROXY_URL = 'http://{}/proxy/ip'.format(HAIPPROXY_URL)
# HAIPPROXY_REPORT_URL = 'http://{}/proxy/report'.format(HAIPPROXY_URL)
#
# # 快代理IP提供服务API
# KUAIPROXY_API = "https://dps.kdlapi.com/api/getdps/?orderid=993266411770523&num=500&pt=1&ut=1&sep=2"
# KUAIPROXY_AUTH = {"username": "youfeng", "password": "s41gqage"}
#
# # 无忧代理IP提供服务API
# DATA5UPROXY_API = "http://api.ip.data5u.com/dynamic/get.html?order=e5022956ba8336095e0f2fabf43483a0&random=true&sep=0"
#
# YUNPROXY_API = 'http://dly.134t.com/query.txt?key=NP5C776178&word=&count=1000&detail=true'
# YUNPROXY_AUTH = {"username": "datamonitor", "password": "555556"}
#
# # 全网代理
# QUANWANG_API = 'http://dynamic.goubanjia.com/dynamic/get/aa0c97be8d3685a49a30d9940f6de998.html?sep=3&ttl=1&random=true'
#
# # 全部使用
# TAG_PROXY_ALL = 0
# TAG_PROXY_STATIC = 1
# TAG_PROXY_DYNAMIC = 2
# TAG_PROXY_HAIPPROXY = 3
# TAG_PROXY_KUAIPROXY = 4
# TAG_PROXY_YUNPROXY = 5
# TAG_PROXY_QUANWANG = 6
#
# USED_PROXY_STATIC = True
# USED_PROXY_DYNAMIC = True
# USED_PROXY_HAIPPROXY = False
# USED_PROXY_KUAIPROXY = True
# USED_PROXY_YUNPROXY = True
# USED_PROXY_QUANWANG = True
#
# # 当前正在使用的代理方式
# g_current_used_proxy = TAG_PROXY_KUAIPROXY
